<?php
if($admin_value['admin_type'] == 'Web Admin' || $admin_value['admin_type'] == 'Sub Admin')
{
	$this->admin = 'admin';
}
else {
	$this->admin = 'panelist';
}
$this->load->view('admin/head'); 
$this->load->view('admin/header');
?>
<!-- Content -->
<div class="space30"></div>
<div class="container">
	<div class="row">
		<div class="col-md-2">
			<nav class="navbar1">
				<?php if($this->session->userdata('admin_type') == 'Panelist'){
				$this->load->view('admin/left_nav1');
				}
				else
				{
				$this->load->view('admin/left_nav');
				}
				?>
			</nav>
		</div>
<div class="col-md-10">
        <!--form starts-->
		<?php echo form_open(BASE_URL.'/'.$this->admin.'/update_profile', array('id' => 'panelist_form'));?>
        	<div class="form_container">
            		<h4>Update Profile</h4>
                    <!--row starts-->
                    <div class="success_msg" style="margin-left:15px;">
					<?php 
						 if($this->session->userdata('panelist_success')){
							echo $this->session->userdata('panelist_success');
							$this->session->set_userdata('panelist_success', '');
						}
					?>
				</div>
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="fullname2">Full Name </label>
                            <input class="form-control white" id="full_name" name="fullname" type="text" placeholder="Full Name" value="<?php if(isset($post_value[0]['admin_fullname'])){ echo $post_value[0]['admin_fullname'];} ?>">
                            <div class="error" id="err-name"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="email2">Email</label>
                            <input class="form-control white" id="email_1" name="email" type="text" readonly placeholder="Email" value="<?php if(isset($post_value[0]['admin_email'])){ echo $post_value[0]['admin_email'];} ?>">
                            <div class="error" id="err-name1"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="password2">Password</label>
                            <input class="form-control white" id="password_1" name="password" type="password">
                            <div class="error" id="err-name2"></div>
                            <span style="color:red;"><?php echo form_error('password'); ?></span>
                            Leave empty if not updating the password
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="confirm_password2">Confirm Password</label>
                            <input class="form-control white" id="confirm_password_1" name="confirm_password" type="password">
                            <div class="error" id="err-name3"></div>
                            <span style="color:red;"><?php echo form_error('confirm_password'); ?></span>
                            Leave empty if not updating the password
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="contact_no2">Contact Number</label>
                            <input class="form-control white" id="contact_no_1" name="contact_no" type="text" placeholder="Contact Number" value="<?php if(isset($post_value[0]['admin_contact_number'])){ echo $post_value[0]['admin_contact_number'];} ?>">
                            <div class="error" id="err-name4"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                     <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="Affiliation2">Affiliation</label>
                            <textarea class="form-control white" name="affiliation" placeholder="Affiliation" ><?php if(isset($post_value[0]['admin_affiliation'])){ echo $post_value[0]['admin_affiliation'];} ?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('affiliation', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
							
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="research_area2">Research Area</label>
                            <textarea class="form-control white" name="research" placeholder="Research" value=""><?php if(isset($post_value[0]['admin_research_area'])){ echo $post_value[0]['admin_research_area'];} ?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('research', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
                    <!--row starts-->
                    	<div class="row1">
                    	<div class="form-group col-sm-12">
                        	<label for="Remark2">Remark</label>
                            <textarea class="form-control white" name="remark" placeholder="Remark"><?php if(isset($post_value[0]['admin_remark'])){ echo $post_value[0]['admin_remark'];} ?></textarea>
                            <script type="text/javascript" src="<?php echo ASSET_URL; ?>ckeditor/ckeditor.js?t=B5GJ5GG"></script>
						<script type="text/javascript">//<![CDATA[
							CKEDITOR.replace('remark', {"toolbar":"Standard"});
							//]]></script>
						<div class="error" id="err-desc"></div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <!--row closed-->
					 
                </div>
				
        <!--form closed-->
         <div class="space30"></div>
          <input type="hidden" name="admin_id" value="<?php if(isset($post_value[0]['admin_id'])){ echo $post_value[0]['admin_id'];} ?>" />
					 <button type="submit" id="panelist_profile_updatebtn" name="submit" class="btn btn-primary">Save & Continue</button>
					 
        <?php echo form_close();?> 
      </div>
       <div class="clearfix"></div>
    </div>    
  </div>    
  
  <div class="space20"></div>  
  <div class="space30"></div>  
 
<!-- Content End -->
<?php $this->load->view('common/footer'); ?> 
  